package com.hongyu.smart.village.ui.activity;

import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.hongyu.smart.village.R;
import com.hongyu.smart.village.config.Constant;
import com.hongyu.smart.village.event.Event;
import com.hongyu.smart.village.model.bean.LifeMenu;
import com.hongyu.smart.village.ui.adapter.LifeRecyclerViewAdapter;
import com.hongyu.smart.village.ui.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class ConvenientActivity extends BaseActivity {
    List<LifeMenu> lifeMenuList=new ArrayList<>();
    @BindView(R.id.life_pay_recycle_view)
    RecyclerView lifeRecyclerView;
    LifeRecyclerViewAdapter adapter;

    @Override
    protected void initActivityData() {
        for (String title: Constant.lifeMenuTitles) {
            LifeMenu lifeMenu = new LifeMenu();
            lifeMenu.setName(title);
            lifeMenuList.add(lifeMenu);
        }

        adapter=new LifeRecyclerViewAdapter(this,lifeMenuList);
        lifeRecyclerView.setLayoutManager(new GridLayoutManager(this,4));
        lifeRecyclerView.setAdapter(adapter);




    }

    @Override
    protected void initContentView() {

    }

    @Override
    protected int getContentView() {
        return R.layout.activity_convenient;
    }

    @Override
    protected void onEventProcess(Event event) {

    }
}
